'use client'

import { useRouter } from 'next/navigation'

import Logo from '@/components/common/Logo'
import SettingPopover from '@/components/common/SettingPopover'
import GradientButton from '../common/GradientButton'
export default function NavBar() {
  const router = useRouter()
  return (
    <nav className="sticky top-0 left-0 right-0 z-50 bg-[rgba(11,12,15,0.7)] backdrop-blur border-solid border-b-[#1f2533]">
      {/* ✅ 移除 max-w 限制，改成两边贴边 */}
      <div className="w-full px-6 lg:px-10 py-3 flex items-center justify-between">
        {/* 左侧 logo */}
        <Logo />

        <div className="flex items-center space-x-3">
          <GradientButton title="Dashboard" fontSize="13px" radius="12px" onClick={() => router.push('/dashboard')} />

          <SettingPopover />
        </div>
      </div>
    </nav>
  )
}
